<%@page import="javax.persistence.criteria.CriteriaBuilder.In"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.ambow.utils.*"%>
<%@page import="com.ambow.Entity.*"%>
<%@page import="com.ambow.*"%>
<%@page import="org.hibernate.*"%>
<%@page import="com.ambow.service.impl.*"%>
<%@page import="com.ambow.service.*"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta name="Keywords" content="关键词1,关键词2，关键词3,关键词4,……" />
<meta name="Description" content="你网页的简述" />
<meta name="Robots" content="All" />
<meta name="Generator" content="Dreamweaver" />
<title>学生领书</title>
<link href="<%=path %>/static/css/css.css" rel="stylesheet" type="text/css" />
</head>

<body>
	<h3 id="subTitle">学生领书</h3>
	<ul id="button">
		<li><a href="javascript:history.back()">返回</a></li>
	</ul>
	<table width="90%" border="0" align="center" cellpadding="0"
		cellspacing="0" class="table" style="margin-top: 10px;">
		<form action="<%=path%>/DeliverToStudentServlet?status=addDeliverToStudent" method="post" name="form1" id="form1">
			<tr>
				<th width="10%" align="center" nowrap="nowrap" class="title2">选择</th>
				<th width="18%" align="center" nowrap="nowrap" class="title2">学号</th>
				<th width="15%" align="center" nowrap="nowrap" class="title2">姓名</th>
				<th width="26%" align="center" nowrap="nowrap" class="title2">班级</th>
			</tr>
			<%
				List<Student> students = (List) request.getAttribute("students");
				for (int i = 0; i < students.size(); i++) {
			%>
			<tr class="within2bg">
				<td align="center"><input type="checkbox" name="student_id"
					value="<%=students.get(i).getId() %>" /></td>
				<td align="center"><%=students.get(i).getNumber()%></td>
				<td align="center"><%=students.get(i).getSname()%></td>
				<td align="center"><%=students.get(i).getBclass().getName() %></td>
			</tr>
			<%
				}
			%>
			<tr align="center" class="within2bg">
				<td colspan="7" align="left" class="no_note">架位： <select
					name="cell">
						<%Session sestation= HibernateUtil.getSession();
				List<Cell> slist =sestation.createQuery("from Cell").list();
				 HibernateUtil.clossSession(); 
				 for(int j=0;j<slist.size();j++){%>
					 <option value="<%=slist.get(j).getId()%>"><%=slist.get(j).getName()%></option>
				<% }%> 
				</select></td>
			</tr>
			<tr align="center" class="within2bg">
			<%List<PackageBook> packageBooks = (List)request.getAttribute("packageBooks") ;%>
			<td><input type="hidden" name="packageBook_id" value="<%=packageBooks.get(0).getId()%>"/></td>
				<td colspan="7" class="no_note"><input name="Input"
					type="submit" value="领书" /></td>
			</tr>
		</form>
	</table>
</body>
</html>